Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary draft of a (non-functional) unit test for svm #33

Open
wants to merge 15 commits into
base: feat/fuel-vm
Choose a base branch
from

Conversation

rigidus
Copy link

@rigidus rigidus commented Sep 16, 2024

This is a temporary pull-request to test the direction I want to go for the SVM implementation. Please do not accept it.

What I want to ask you is:

  • How the state change is arranged and how do I properly implement it when the Solana virtual machine executes the Solana program. What functions should I call for this and at what time - after the program execution or directly during its execution?

  • What is the correct way to verify in a test that the state of the blockchain is changed and changed correctly?

  • What should I change in _exec_fuel_tx() to work properly with consensus? How it is organized in general and how _exec_fuel_tx() is organized?

  • Should I extend the context in which the Solana program will be executed or should I create a separate context for this?

  • How are context and genesis related?

  • Where should I place the code of the minimal Solana program I am testing?

  • How do I add precompiles for Solana and do I need a separate module for that?

@rigidus rigidus requested a review from bfdays September 16, 2024 09:41
@bfdays
Copy link
Contributor

bfdays commented Sep 16, 2024

How the state change is arranged and how do I properly implement it when the Solana virtual machine executes the Solana program. What functions should I call for this and at what time - after the program execution or directly during its execution?

  • we use sdk to work with state. "after the program execution or directly during its execution?" - any.

What is the correct way to verify in a test that the state of the blockchain is changed and changed correctly?

  • using sdk methods.

What should I change in _exec_fuel_tx() to work properly with consensus? How it is organized in general and how _exec_fuel_tx() is organized?

  • no need in consensus. using it in fuel just to fetch some specific params and to not modify original interfaces.

Should I extend the context in which the Solana program will be executed or should I create a separate context for this?

  • u need adapter which will proxy solana requests to our sdk

How are context and genesis related?

  • genesis setups up evm context

Where should I place the code of the minimal Solana program I am testing?

  • svm dir in core crate is enough for now

How do I add precompiles for Solana and do I need a separate module for that?

  • we will add precompiles as a separate impls later. for now lets create some very simple solution where we compile precompiles with the main program into wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants